package com.linghang.wusthelper.dao.primary;

import com.linghang.wusthelper.entity.primary.Grade;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author origin
 */
@Repository
//主数据源的SqlSessionTemplate
@Qualifier("primarySqlSessionTemplate")
public interface GradeDao {

    int insert(Grade grade);

    Grade selectByStuNum(String stuNum);

    int gradeNum(String stuNum);

    List<Grade> selectGradeByStu(String stuNum);

    List<String> selectHashByStuNum(String stuNum);

    int exist(Grade grade);

    int delInvalid(@Param("stuNum") String stuNum,@Param("gradeHash") String gradeHash);

}
